package com.mspbots.rule.queue.timeentry;

import com.mspbots.cw.request.TenantTimeEntryDTO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author Dinnes Zhang
 * @date
 */
@Slf4j
@Component
public class AfterHourQueue extends TimeEntryBaseQueue {

    private static final String RULE_NAME = "AfterHour";

    @RabbitListener(queues = "trigger.timeEntry.AfterHour")
    public void onQueue(TenantTimeEntryDTO tenantTimeEntryDTO) {
        log.debug("AfterHour queue: {}", tenantTimeEntryDTO.getCwTid());
        super.onRule(RULE_NAME, tenantTimeEntryDTO);
    }
}
